﻿using System;
using System.Collections.Generic;
using SobrietyEngine.Components.Common;
using SobrietyEngine.Components.Camera;
using SobrietyEngine.Scene;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace SobrietyEngine.Actor.Builders.Cameras
{
    public class GuiCameraBldr:BaseActorBuilder
    {
        public static IActor Build(IScene scene, Viewport view)
        {
            IActor actor = scene.CreateEmptyActor();
            actor.AttachComponent(new PositionCmp(new Vector2(view.Width / 2, view.Height / 2)));
            actor.AttachComponent(new Camera2DCmp(view, Matrix.Identity));
            actor.Initialize();
            return actor;
        }
    }
}
